﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace erpWebapiBack.ApplicationDev.mytest
{
    public class mytestBLL : mytestIBLL
    {
        public mytestService mytestService = new mytestService();

        public mytestEntity GetMytestEntity(string keyValue)
        {
            return mytestService.GetMytestEntity(keyValue);
        }

        /// <summary>
        /// 委托查询
        /// </summary>
        /// <param name="id"></param>
        /// <param name="name"></param>
        /// <returns></returns>
        public mytestEntity GetMytestEntity(string id, string name)
        {
            return mytestService.GetMytestEntity(id, name);
        }

        /// <summary>
        /// SQL 查询数据
        /// </summary>
        /// <param name="query"></param>
        /// <returns></returns>
        public IEnumerable<mytestEntity> GetMytestEntities(string query)
        {
            return mytestService.GetMytestEntities(query);
        }

        /// <summary>
        /// 插入实体
        /// </summary>
        /// <param name="entity"></param>
        /// <returns></returns>
        public int InsertMytest(mytestEntity entity)
        {
            return mytestService.InsertMytest(entity);
        }

        /// <summary>
        /// 批量插入数据
        /// </summary>
        /// <param name="entity"></param>
        /// <returns></returns>
        public int InsertBranchMytest(IEnumerable<mytestEntity> entity)
        {
            return mytestService.InsertBranchMytest(entity);
        }

        /// <summary>
        /// 更新数据
        /// </summary>
        /// <param name="entity"></param>
        /// <returns></returns>
        public int UpdateMytest(mytestEntity entity)
        {
            return mytestService.UpdateMytest(entity);
        }

        /// <summary>
        /// 删除一个
        /// </summary>
        /// <param name="mytestEntity"></param>
        /// <returns></returns>
        public int DeleteMytest(mytestEntity mytestEntity)
        {
            return mytestService.DeleteMytest(mytestEntity);
        }

        /// <summary>
        /// 删除多个
        /// </summary>
        /// <param name="mytestEntities"></param>
        /// <returns></returns>
        public int DeleteBranchMytest(IEnumerable<mytestEntity> mytestEntities)
        {
            return mytestService.DeleteBranchMytest(mytestEntities);
        }

        /// <summary>
        /// SQL 语句执行
        /// </summary>
        /// <param name="id"></param>
        /// <param name="name"></param>
        /// <returns></returns>
        public int ExecSqlUpdateData(string id, string name)
        {
            return mytestService.ExecSqlUpdateData(id, name);
        }
    }
}
